<template>
  <div>
    <ul>
      <li v-for="msg in msgList" :key="msg.id">
        <router-link :to="{ name: 'MsgDetail', params: msg }">{{
          msg.title
        }}</router-link
        >&nbsp;&nbsp;
      </li>
      <hr />
      <router-view></router-view>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'homeMessage',
  data() {
    return {
      msgList: [
        { id: 1, title: '歇后语', content: '裤裆里着火了---当然了' },
        { id: 2, title: '猜谜语', content: '胸前挂钥匙' },
        { id: 3, title: '每日一语', content: 'aaa' },
      ],
    }
  },
}
</script>

<style></style>
